<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>红灯笼 - 登录</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            display: flex;
            height: 100vh;
            font-family: Arial, sans-serif;
        }

        .left-section {
            flex: 1;
            background-image: url(image/login-l.png);
            background-size: cover;
            background-position: center;
        }

        .right-section {
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            background: white;
            padding: 2rem;
        }

        .logo {
            width: 150px;
            margin-bottom: 2rem;
        }

        .login-form {
            width: 100%;
            max-width: 300px;
        }

        .input-group {
            margin-bottom: 1rem;
        }

        input {
            width: 100%;
            padding: 0.75rem;
            border: 1px solid #ddd;
            border-radius: 4px;
            margin-top: 0.5rem;
        }

        .login-button {
            width: 100%;
            padding: 0.75rem;
            background-color: #FFB800;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 1rem;
        }

        .login-button:hover {
            background-color: #FFA500;
        }
    </style>
</head>
<body>
    <div class="left-section"></div>
    <div class="right-section">
        <img src="image/login-logo.jpg" alt="红灯笼" class="logo">
        <form class="login-form" action="/login" method="post">
            <div class="input-group">
                <input type="text" name="username" placeholder="请输入账号" required>
            </div>
            <div class="input-group">
                <input type="password" name="password" placeholder="请输入密码" required>
            </div>
            <button type="submit" class="login-button">登录</button><p></p>
        </form>
    </div>
    <%
        String error = (String) request.getAttribute("msg");
        if (error != null) {
    %>
    <script>
        alert("<%=error%>");
    </script>
    <%
        }
    %>
</body>
</html>